﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DatabaseManager.Core.Models
{
    // 数据库连接模型
    public class DatabaseConnection
    {
        public Guid Id { get; set; }
        public string Name { get; set; }
        public DatabaseType Type { get; set; }
        public string ServerIp { get; set; }
        public int Port { get; set; }
        public string Username { get; set; }
        public string Password { get; set; }
        public bool IsActive { get; set; }
        public DateTime CreatedAt { get; set; }
        public DateTime? LastConnectedAt { get; set; }

        // 关联字段
        public string DatabaseName { get; set; } // 外键指向 DatabaseInfo.Name
    }

    public enum DatabaseType
    {
        MySQL,
        MSSQL,
        Oracle
    }
}
